<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>读写数组元素</title>
</head>

<body>
  <script>
    let a = ["world", 3.14, 3, "hello"]
    // a[3]='world'
    console.log(a[a[2]] = a[0]);
    a[-1.2] = 0
    console.log(a);
    console.log(a['-1.2']);

    let o = {};
    o[0] = 'one'
    console.log(o);
    console.log(o["0"] == o[0]);
  </script>
</body>

</html>